
package com.kweative.model.column;

import com.kweative.model.Table;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author henrik
 */
public class ColumnClass<T extends Table> extends ColumnText<T> {

    public ColumnClass(String name) {
		this();
		setName(name);
    }

	public ColumnClass() {
		super(120);
	}


    @Override
    public String serialize(Object value) {
        return ((Class)value).getName();
    }
    public Class unserialize(String value) {
        try {
            return Class.forName(value);
        } catch (ClassNotFoundException ex) {
            Logger.getLogger(ColumnClass.class.getName()).log(Level.SEVERE, null, ex);
        }
        return null;
    }


}
